DEFINE BUFFER sct FOR sct_det.
DEFINE BUFFER sct2 FOR sct_det.

FOR EACH sct NO-LOCK WHERE sct.sct_sim = "standard" AND sct.sct_site = "500" AND sct.sct_bdn_tl <> 0,
    EACH ptp_det NO-LOCK WHERE ptp_site = sct_site AND ptp_part = sct_part AND ptp_pm_code = "D", 
    EACH pt_mstr NO-LOCK WHERE pt_part = ptp_part AND pt_pm_code = "M":


    FIND sct2 WHERE sct2.sct_part = sct.sct_part AND sct2.sct_site = "500" AND sct2.sct_sim = "2006-01S" NO-ERROR.
    DISP sct.sct_part sct.sct_site sct.sct_sim sct.sct_cst_tot sct.sct_lbr_tl sct.sct_bdn_tl sct2.sct_cst_tot sct2.sct_cst_date ptp_pm_code pt_pm_code
        WITH WIDTH 200.
END.
